﻿var _callback = null;
var _options = null;
var validCallBack = null;
$(function()
{
	var obj = new MaskControl();
	function showRequest(formData, jqForm, options)
	{
		if(validCallBack != null)
		{
			var rtn = validCallBack();
			if(!rtn) return false;
		}
		if(confirm("确认批量复制吗？"))
		{
			var queryString = $.param(formData); //组装数据，插件会自动提交数据
			obj.show("<img src='" + ctx + "/themes/img/loading.gif' />正在保存……");
			return true;
		}
		return false;
	}
	//提交后

	function showResponse(responseText, statusText)
	{
		obj.autoDelayHide(responseText, 3000);
		if(statusText == "success")
			obj.callBack = _callback;
	}
	_options =
	{
		beforeSubmit:showRequest, //提交前

		success:showResponse, //提交后 
		resetForm:false//成功提交后，重置所有的表单元素的值

	};
});